import type { RouteRecordRaw } from "vue-router";
import { Timer, User, Star, KnifeFork, GoldMedal, School,Memo } from '@element-plus/icons-vue'
import { markRaw } from 'vue'

const routes: RouteRecordRaw[] = [
	{
		path: '/',
	    redirect: '/index',
		component: () => import('@/views/layout/index.vue'),
		children: [
			{
				path: '/index',
				component: () => import('@/views/index/index.vue'),
				meta: {
					// auth是否需要验证管理员身份
					auth: false,
					//侧边栏标题
					title: '酒店介绍',
					icon: markRaw(School)
				}
			},
			{
				path: '/book',
				component: () => import('@/views/rooms/index.vue'),
				meta: {
					auth: false,
					login: true,
					title: '客房预定',
					icon: markRaw(Timer)
				}
			},
			{
				path: '/me',
				component: () => import('@/views/me/index.vue'),
				meta: {
					auth: false,
					login: true,
					title: '个人信息',
					icon: markRaw(User)
				}
			},
			{
				path: '/vip',
				component: () => import('@/views/vip/index.vue'),
				meta: {
					auth: false,
					login: true,
					title: 'VIP服务',
					icon: markRaw(Star)
				}
			},
			{
				path: '/food',
				component: () => import('@/views/food/index.vue'),
				meta: {
					auth: false,
					login: true,
					title: '餐饮服务',
					icon: markRaw(KnifeFork)
				}
			},
			{
				path: '/appraise',
				component: () => import('@/views/comment/index.vue'),
				meta: {
					auth: false,
					title: '酒店评价',
					icon: markRaw(GoldMedal)
				}
			},
			{
				path: '/user',
				component: () => import('@/views/user/index.vue'),
				meta: {
					auth: false,
					title: '用户管理',
					icon: markRaw(Memo)
				}
			},

		]
	},
]

export default routes